//
//  BK_OD_Tool.m
//  bestkeep
//
//  Created by TOPTEAM on 2017/3/13.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BK_OD_Tool.h"


NSString *const BKOrderLocalizableTableName = @"BKOrderLocalizable";

@implementation BK_OD_Tool

+ (NSString *)localizedStringWithKey:(NSString *)key{
    
    return NSLocalizedStringFromTable(key, BKOrderLocalizableTableName, nil);
}

+ (NSString *)orderServicesURL:(NSString *)url
{
    NSString *servicesURL = ApplicationEnvironmentProduction ? @"http://api.bestkeep.cn" : @"http://api.test.bestkeep.cn";
    
    return [NSString stringWithFormat:@"%@/%@", servicesURL, url];
}

+ (NSString *)orderWebURL:(NSString *)url
{
    NSString *webURL = ApplicationEnvironmentProduction ? @"http://m.bestkeep.cn/" : @"http://m.test.bestkeep.cn/";
    
    return [NSString stringWithFormat:@"%@%@", webURL, url];
}

+ (NSString *)orderUTOUUURL:(NSString *)url
{
    NSString *UTOUUURL = ApplicationEnvironmentProduction ? @"https://passport.utouu.com/" : @"https://passport.test.utouu.com/";
    
    return [NSString stringWithFormat:@"%@%@", UTOUUURL, url];
}

+ (void)orderPromptMsg:(NSString *)msg
{
    NSString *promptMsg = msg;
    if (msg.length > 200) {
        promptMsg = [msg substringToIndex:200];
    }
    [HUD showMessage:promptMsg];
}

+ (void)orderSuccessMsg:(NSString *)msg
{
    [HUD showSuccessMessage:msg];
}

+ (void)orderLoading
{
    [HUD showProgress:nil];
}

+ (void)orderDismiss
{
    [HUD dismiss];
}
@end












































